home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 2000 #2 / Sun Solutions CD (Volume 2 2000)(Special Focus - Java Technologies)(Disc 1).ISO / products / Software / BostonBusinessComputing / bbc / dist / vdecnet < prev    next >
Text File  |  2000-02-11  |  3KB  |  114 lines

  1.  
  2. #
  3. # Vsh script for use with DECnet transport software
  4. #
  5.  
  6. IF ( v_com == "rl" )  SET v_node=v_n1
  7.  
  8. set v_a1 = (v_fs1:ua) - "::"
  9. set v_a2 = (v_fs2:ua) - "::"
  10. SET v_n1 = v_n1 + v_a1
  11. SET v_n2 = v_n2 + v_a2
  12.  
  13. IF ( -n v_n1 ) THEN
  14.     SET v_n1 = v_n1 + "::"
  15. ELSE
  16.     SET v_n2 = v_n2 + "::"
  17. ENDIF
  18.  
  19. # Set qualifier strings
  20. IF ( q_log ) SET vq_log = " -L "
  21. IF ( q_image ) SET vq_image = " -i "
  22. IF ( q_full ) SET vq_full = " -l "
  23. IF ( v_os == "no" ) SET vq_full = " -l "
  24. IF ( q_confirm ) SET vq_confirm = " -q "
  25. IF ( q_replace ) SET vq_replace = " -s "
  26.  
  27. #
  28. # Execute the appropriate network command
  29. #
  30. IF ( v_com == "bt" ) THEN
  31.     # exit here to test for existence of vnet for vbackup
  32.     EXIT
  33. ELSE IF ( v_com == "ba" ) THEN
  34.     SET inf = v_n1+v_d1+v_f1
  35.     SET outf= v_n2+v_d2+v_f2
  36.     IF ( -n v_n1 ) THEN
  37.         SET netcom = "dcp -i " + "\'" + inf + "\'" + " -"
  38.     ELSE
  39.         SET netcom = "dcp -i - " + "\'" + outf + "\'"
  40.     ENDIF
  41.     SHELL netcom
  42.     EXIT
  43. ELSE IF ( v_com == "cp" ) THEN
  44.     SET quals = vq_image + vq_log + vq_confirm + vq_replace
  45.     SET inf = v_n1+v_d1+v_f1
  46.     SET outf= v_n2+v_d2+v_f2
  47.     SET netcom =  "dcp " + quals + "\'" + inf+ "\' \'"+ outf + "\'"
  48.     SHELL netcom
  49.     EXIT
  50. ELSE IF ( v_com == "ls" ) THEN
  51.     SET fn = "/tmp/v_" + pid
  52.     SET quals = vq_full
  53.     SET inf = v_n1+v_d1+v_f1
  54.     SET tsscom ="dls " + quals + "\'" + inf + "\'"
  55.     SET netcom = tsscom + " < /dev/null > "+ fn
  56.     SHELL netcom
  57.     IF ( q_full ) THEN
  58.       IF ( -n fn) THEN
  59.         SHELL "/bin/cat " + fn + " ; /bin/rm " + fn
  60.       ENDIF
  61.       EXIT
  62.     ENDIF
  63.     IF ( v_os == "yes" ) THEN
  64.         SET v_filter = "tssvmsfltr"
  65.     ELSE
  66.         SET v_filter = "tssunxfltr"
  67.     ENDIF
  68.     IF ( -n fn) THEN
  69.         SHELL "/bin/cat " + fn + " | " + v_filter + "; /bin/rm " + fn
  70.     ENDIF
  71.     EXIT
  72. ELSE IF ( v_com == "ma" ) THEN
  73.     SET quals = vq_log
  74. #    SET netcom =  "dnamail " + quals + "\'" + recips + text +"\'"
  75.     SET netcom="/usr/lib/sendmail -t "+ recips + " " + text
  76.     SHELL netcom
  77.     EXIT
  78. ELSE IF ( v_com == "mv" ) THEN
  79.     SET quals = vq_log + vq_confirm
  80.     SET inf = v_n1+v_d1+v_f1
  81.     SET outf= v_f2
  82.     SET netcom =  "dmv " + quals + "\'" + inf +"\' \'"+ outf + "\'"
  83.     SHELL netcom
  84.     EXIT
  85. ELSE IF ( v_com == "pr" ) THEN
  86.     SET quals = vq_log
  87.     SET inf = v_n1+v_d1+v_f1
  88.     SET netcom =  "dpr " + quals + "\'" + inf + "\'"
  89.     SHELL netcom
  90.     EXIT
  91. ELSE IF ( v_com == "rl" ) THEN
  92.     SET netcom =  "dlogin " + v_node + " < /dev/tty"
  93.     SHELL netcom
  94.     EXIT
  95. ELSE IF ( v_com == "rm" ) THEN
  96.     SET quals = vq_log + vq_confirm
  97.     SET inf = v_n1+v_d1+v_f1
  98.     SET netcom =  "drm " + quals + "\'" + inf + "\'"
  99.     SHELL netcom
  100.     EXIT
  101. ELSE IF ( v_com == "sn" ) THEN
  102.     SET netcom =  "ncp show known nodes "
  103.     SHELL netcom
  104.     EXIT
  105. ELSE IF ( v_com == "ty" ) THEN
  106.     SET quals = vq_log
  107.     SET inf = v_n1+v_d1+v_f1
  108.     SET netcom =  "dcat " + quals + "\'" + inf + "\'"
  109.     SHELL netcom
  110.     EXIT
  111. ELSE
  112.     ERROR "%VNET-W-IVCOMM, Invalid command."
  113. ENDIF
  114.